﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BO;
using BLL;

namespace Facebook
{
    public static class Service
    {
        public static void ProcessFacebook(FBPage p)
        {
            FacebookClient fbClient = new FacebookClient(p.Token);

            var lastPost = Accounts.GetLastPost(p.ID);
            var filterString = lastPost != null? "since=" + lastPost.Date.ToString("MM/dd/yyyy HH:mm:ss"): "";

            var res = fbClient.Get(String.Format("{0}/feed?{1}", p.ForeignID, filterString));


        }
    }
}
